package com.run.service.impl;

import com.github.pagehelper.PageHelper;
import com.run.mapper.EbOrderMapper;
import com.run.model.EbOrder;
import com.run.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServicelmpl implements OrderService {
    @Autowired
    private EbOrderMapper ebOrderMapper;

    @Override
    public List<EbOrder> list(int page, int pageSize) {
        return ebOrderMapper.selectByExample(null);
    }

    @Override
    public EbOrder selectOne(Integer eoId) {
        return ebOrderMapper.selectByPrimaryKey(eoId);
    }

    @Override
    public Integer updateOrder(EbOrder ebOrder) {
        return ebOrderMapper.updateByPrimaryKey(ebOrder);
    }

    @Override
    public int deltOrder(Integer enId) {
        return ebOrderMapper.deleteByPrimaryKey(enId);
    }
}
